package com.agentfactory.teleoreactive.interpreter.mentalstate;


import com.agentfactory.logic.update.lang.Predicate;
import com.agentfactory.teleoreactive.interpreter.AbstractTeleoReactiveAgent;
import com.agentfactory.teleoreactive.interpreter.Utilities;

public abstract class AbstractComponent {
	protected AbstractTeleoReactiveAgent agent;
	private Predicate id;
	
	public void setId(Predicate id) {
		this.id = id;
	}
	
	public Predicate getId() {
		return id;
	}
	
	public void setAgent(AbstractTeleoReactiveAgent agent) {
		this.agent = agent;
	}
	
	protected void addBelief(String belief) {
		agent.addBelief((Predicate) Utilities.factory.createFormula(belief));
	}
	
	public String toString() {
		return id.toString() + "->" + getClass().getName();
	}
}
